package com.buba.service.impl;

import com.buba.dao.FloorMapper;
import com.buba.pojo.Floor;
import com.buba.service.FloorService;
import com.buba.vo.FloorVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class FloorServiceImpl implements FloorService {

    @Resource
    private FloorMapper floorMapper;

    /**
     * todo 查询楼层列表
     * @param floorVO
     * @return
     */
    public List<Floor> findFloorList(FloorVO floorVO) {
        return floorMapper.findFloorList(floorVO);
    }

    /**
     * todo 添加楼层
     * @param floor
     * @return
     */
    public int addFloor(Floor floor) {
        return  floorMapper.addFloor(floor);
    }
    /**
     * todo 修改楼层
     * @param floor
     * @return
     */
    public int updateFloor(Floor floor) {
        return floorMapper.updateFloor(floor);
    }


    /**
     * todo 删除楼层
     * @param id
     * @return
     */
    public int deleteById(Integer id) {
        return floorMapper.deleteById(id);
    }


}
